{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
	<li class="active" ><a href="#tab_basic">基本设置</a></li>
	<li><a href="#tab_share">分享设置</a></li>
	<li><a href="#tab_param">退款设置</a></li>
	<li><a href="#tab_param1">通知设置</a></li>
	<li><a href="#tab_param2">商城设置</a></li>
	<li><a href="#tab_param3">模版设置</a></li>
</ul>
<div class="main">
	<form action="" method="post" class="form-horizontal form" id="setting-form">
		<div class="panel panel-default">
			<div class="panel-heading">系统设置</div>
			<div class="panel-body">
				<div class="tab-content">
					<div class="tab-pane  active" id="tab_basic">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">分享团</label>
							<div class="col-xs-12 col-sm-8">
								<label class="radio radio-inline">
									<input type="radio" name="sharestatus" value="1" {if intval($settings['sharestatus']) == 1}checked="checked"{/if} onclick="$('#share_type').show();"> 开启
								</label>
								<label class="radio radio-inline">
									<input type="radio" name="sharestatus" value="2" {if intval($settings['sharestatus']) == 2}checked="checked"{/if} onclick="$('#share_type').hide();"> 关闭
								</label>
								<span class="help-block">分享团在商品详情页，用于更快组团，默认开启。</span>
							</div>
						</div>
						<!--<div class="form-group goodstip" id="share_type" {if $settings['sharestatus']!=1}style="display:none;"{/if}>
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">分享团显示方式</label>
							<div class="col-xs-12 col-sm-8">
								<label class="radio radio-inline">
									<input type="radio" name="share_type" value="1" {if intval($settings['share_type']) == 1}checked="checked"{/if}> 直接显示
								</label>
								<label class="radio radio-inline">
									<input type="radio" name="share_type" value="2" {if intval($settings['share_type']) == 2}checked="checked"{/if}> 附近团按钮
								</label>
							</div>
						</div>-->
						<!--<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">自动签收时间</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="gettime" class="form-control" value="{$settings['gettime']}" />
								<span class="input-group-addon">天</span>
							</div>
							<span class="help-block" style="margin-left: 16.66666667%;">自发货后计时，签收时间。默认为5天</span>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">核销订单维持“待核销”天数</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="checkgettime" class="form-control" value="{$settings['checkgettime']}" />
								<span class="input-group-addon">天</span>
							</div>
							<span class="help-block" style="margin-left: 16.66666667%;">自购买后计时N天后该订单金额成为商家可结算金额。默认为5天（没有核销商品的可不填）</span>
						</div>-->
					<!-- 关注参数设置开始 -->
					
					
					<!-- 关注参数设置结束 -->
					
					</div>
					<div class="tab-pane" id="tab_share">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">分享标题</label>
							<div class="col-sm-8">
								<input type="text" name="share_title" class="form-control" value="{$settings['share_title']}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">分享图片</label>
							<div class="col-sm-8">
								{php echo tpl_form_field_image('share_image', $settings['share_image']);}
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">分享描述</label>
							<div class="col-sm-8">
								<textarea style="height:150px;" id="description" name="share_desc" class="form-control description" cols="60">{$settings['share_desc']}</textarea>
							</div>
						</div>
					</div>
					<div class="tab-pane" id="tab_param">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">微信支付商户号(MchId)</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="mchid" class="form-control" value="{$settings['mchid']}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商户支付密钥(API密钥)</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="apikey" class="form-control" value="{$settings['apikey']}" />
							</div>
						</div>
						<div class="form-group">
		                    <label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商户支付证书</label>
		                    <div class="col-sm-8 col-xs-12">
		                        <textarea class="form-control" name="cert" rows="8" placeholder="为保证安全性, 不显示证书内容. 若要修改, 请直接输入"></textarea>
		                        <span class="help-block">从商户平台上下载支付证书, 解压并取得其中的 <mark>apiclient_cert.pem</mark> 用记事本打开并复制文件内容, 填至此处</span>
		                    </div>
		                </div>
		                <div class="form-group">
		                    <label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">支付证书私钥</label>
		                    <div class="col-sm-8 col-xs-12">
		                        <textarea class="form-control" name="key" rows="8" placeholder="为保证安全性, 不显示证书内容. 若要修改, 请直接输入"></textarea>
		                        <span class="help-block">从商户平台上下载支付证书, 解压并取得其中的 <mark>apiclient_key.pem</mark> 用记事本打开并复制文件内容, 填至此处</span>
		                    </div>
		                </div>
					</div>
					<div class="tab-pane" id="tab_param1">
						<div class="form-group">
							<label class="col-md-2 control-label">模板消息配置说明</label>
							<div class="col-md-8">
								<div class="alert alert-warning">
									<h5 style="text-indent: 18px;">注: 只有 <b>认证服务号</b> 添加消息模板后才可以使用模板消息功能。</h5>
									<ol>
										<li>登陆<a href="https://mp.weixin.qq.com/">【微信公众平台】</a>-【功能】-【模板消息】</li>
										<li>选择行业为：“IT科技 - 互联网|电子商务”</li>
										<li>在【模板库】搜索对应模板标题找到对应模板,点击详情保存添加,重复执行。</li>
										<li>把【我的模板】下对应标题复制模板ID到本页设置对应位置。</li>
									</ol>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">订单代付成功通知模板ID</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="m_daipay" class="form-control" value="{$settings['m_daipay']}" />
								<span class="help-block">公众平台模板消息编号：IT科技——互联网|电子商务——OPENTM200561396[名称：订单代付成功通知]</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">订单支付成功模板ID</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="m_pay" class="form-control" value="{$settings['m_pay']}" />
								<span class="help-block">公众平台模板消息编号：IT科技——互联网|电子商务——TM00015[名称：订单支付成功]</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">团购结果通知模板ID</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="m_tuan" class="form-control" value="{$settings['m_tuan']}" />
								<span class="help-block">公众平台模板消息编号：IT科技——互联网|电子商务——TM00353[名称：团购结果通知]</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">订单取消通知模板ID</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="m_cancle" class="form-control" value="{$settings['m_cancle']}" />
								<span class="help-block">公众平台模板消息编号：IT科技——互联网|电子商务——OPENTM202355776[名称：订单取消通知]</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">订单发货提现模板ID</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="m_send" class="form-control" value="{$settings['m_send']}" />
								<span class="help-block">公众平台模板消息编号：IT科技——互联网|电子商务——OPENTM200565259[名称:订单发货提现]</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">退款通知模板ID</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="m_ref" class="form-control" value="{$settings['m_ref']}" />
								<span class="help-block">公众平台模板消息编号：IT科技——互联网|电子商务——TM00004[名称:退款通知]</span>
							</div>
						</div>
					</div>
					<div class="tab-pane" id="tab_param2">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商城名称</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="sname" class="form-control" value="{$settings['sname']}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商城LOGO</label>
							<div class="col-sm-8">
								{php echo tpl_form_field_image('slogo', $settings['slogo']);}
							</div>
						</div>
						<!--<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">拼团宣传群二维码</label>
							<div class="col-sm-8">
								{php echo tpl_form_field_image('qrcode', $settings['qrcode']);}
								<span class="help-block">用户通过该二维码加入拼团群，可快速拉人成团</span>
							</div>
						</div>-->
						<div class="form-group goodstip" >
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">顶部引导关注提示</label>
							<div class="col-xs-12 col-sm-8">
								<label class="radio radio-inline">
									<input type="radio" name="guanzhu" value="1" {if intval($settings['guanzhu']) == 1}checked="checked"{/if}> 未关注时显示
								</label>
								<label class="radio radio-inline">
									<input type="radio" name="guanzhu" value="2" {if intval($settings['guanzhu']) == 2}checked="checked"{/if}> 不显示
								</label>
							</div>
						</div>
						<div class="tab-pane" id="tab_followed">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">关注二维码</label>
							<div class="col-sm-8">
								{php echo tpl_form_field_image('followed_image', $settings['followed_image']);}(建议430*430)
							</div>
						</div>
					</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">版权信息</label>
							<div class="col-xs-12 col-sm-8">
								<input type="text" name="copyright" class="form-control" value="{$settings['copyright']}" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">拼团介绍</label>
							<div class="col-sm-8 col-xs-12">
								{php echo tpl_ueditor('content', $settings['content']);}
								<span class="help-block">为空则为默认介绍</span>
							</div>
						</div>
					</div>
					<div class="tab-pane" id="tab_param3">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签1</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag1" class="form-control" value="{$settings['tag1']}" />
								<span class="help-block">默认为：上新</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签2</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag2" class="form-control" value="{$settings['tag2']}" />
								<span class="help-block">默认为：疯抢</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签3</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag3" class="form-control" value="{$settings['tag3']}" />
								<span class="help-block">默认为：推荐</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签4</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag4" class="form-control" value="{$settings['tag4']}" />
								<span class="help-block">默认为：优惠</span>
							</div>
						</div>
					</div>
					<div class="tab-pane" id="tab_param5">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签1</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag1" class="form-control" value="{$settings['tag1']}" />
								<span class="help-block">默认为：上新</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签2</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag2" class="form-control" value="{$settings['tag2']}" />
								<span class="help-block">默认为：疯抢</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签3</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag3" class="form-control" value="{$settings['tag3']}" />
								<span class="help-block">默认为：推荐</span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label">商品标签4</label>
							<div class="col-xs-12 col-sm-2 input-group" >
								<input type="text" name="tag4" class="form-control" value="{$settings['tag4']}" />
								<span class="help-block">默认为：优惠</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</form>
</div>
<script>
$(function () {
		window.optionchanged = false;
		$('#myTab a').click(function (e) {
			e.preventDefault();//阻止a链接的跳转行为
			$(this).tab('show');//显示当前选中的链接及关联的content
		})
	});
</script>
{php include wl_template('common/footer');}